﻿package com.toncen.samepms.system.dao;

import java.util.List;

import com.toncen.samepms.common.AbstractDao;
import com.toncen.samepms.system.domain.Role;

/**
 * 描述：角色表SYSTEM_ROLE的dao文件
 * 
 * @author fdf
 */
public class RoleDao extends AbstractDao<Role> {

	public RoleDao() {
	}

	/**
	 * @param state
	 * @return
	 * @throws Exception
	 */
	public List<Role> getAllByState(int state) throws Exception {
		return findList("getAllByState", state);
	}

	/**
	 * 
	 * @param registerable
	 * @return
	 * @throws Exception
	 */
	public List<Role> getAllByRegisterable(int registerable) throws Exception {
		return findList("getAllByRegisterable", registerable);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.comit.common.db.BaseDao#initialize()
	 */
	@Override
	protected void initialize() {
		setStatementPrefix("Role");
		setStatementDivision(".");
	}
}
